# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=libsigc++

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.3.1
pkgrel=2
pkgdesc="Libsigc++ implements a full callback system for use in widget libraries - V2 (mingw-w64)"
arch=('any')
url="http://libsigc.sourceforge.net"
license=("LGPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
options=('staticlibs' 'strip')
source=("http://ftp.gnome.org/pub/GNOME/sources/libsigc++/${pkgver%.*}/libsigc++-${pkgver}.tar.xz")
sha256sums=('67d05852b31fdb267c9fdcecd40b046a11aa54d884435e99e3c60dd20cd60393')

build() {
  mkdir -p "${srcdir}/build-${MINGW_CHOST}"
  cd "${srcdir}/build-${MINGW_CHOST}"
  "${srcdir}"/${_realname}-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --build=${MINGW_CHOST} \
    --host=${MINGW_CHOST} \
    --enable-static \
    --enable-shared \
    --disable-documentation
  make
}

package() {
  cd "${srcdir}/build-${MINGW_CHOST}"
  make DESTDIR="$pkgdir" install
}
